package com.wudl.core

import org.apache.spark.{SparkConf, SparkContext}

object SparkMap {
  def main(args: Array[String]): Unit = {

    val conf: SparkConf = new SparkConf().setMaster("local[1]").setAppName("SparkMap");
    val sc = new SparkContext(conf)
    val rdd = sc.makeRDD(1 to (4), 2)
    val mapRdd = rdd.map(_ * 2)
    mapRdd.collect().foreach(println)

    sc.stop()

  }
}
